package com.eight.order.controller;

import com.eight.common.vo.Result;
import com.eight.order.pojo.Teacher;
import com.eight.order.service.TeacherService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: qy8-education
 * @description:
 * @author: 郑友民（1460115388@qq.com）
 * @create: 2023-05-27 16:15
 **/
@RestController
@RequestMapping("order/teacher")
@Api(tags = "订单老师接口类")
public class TeacherController {
    @Autowired
    private TeacherService teacherService;
    @PostMapping("queryAllTeacherByTeacherName/{teacherName}")
    @ApiOperation("通过老师名字获取到老师")
    public Result queryAllTeacherByTeacherName(@PathVariable String teacherName){
        Teacher teacher=teacherService.queryAllTeacherByTeacherName(teacherName);
        return Result.success(teacher);
    }
}

